﻿namespace LibraryCatalog.Models
{
    public class BookRequest
    {
        public string BookId { get; set; }
        public string Name { get; set; }
        public string Author { get; set; }
        public string Isbn { get; set; }
        public string LibraryId { get; set; }

        public bool NameIsEmpty
        {
            get { return string.IsNullOrEmpty(Name); }
        }

        public bool AuthorIsEmpty
        {
            get { return string.IsNullOrEmpty(Author); }
        }

        public bool LibraryIdIsEmpty
        {
            get { return string.IsNullOrEmpty(LibraryId); }
        }

        public bool HasErrors
        {
            get { return NameIsEmpty || AuthorIsEmpty || LibraryIdIsEmpty; }
        }
    }
}